Provides status information about a script run with Exec along with access to the StdIn, StdOut, and StdErr streams.
Remarks
Example
The following code runs calc.exe and echoes the final status to the screen.
Visual Basic Script  | Copy Code |
---|
Dim WshShell, oExec
Set WshShell = CreateObject("WScript.Shell")
Set oExec = WshShell.Exec("calc")
Do While oExec.Status = 0
WScript.Sleep 100
Loop
WScript.Echo oExec.Status |
JScript  | Copy Code |
---|
var WshShell = new ActiveXObject("WScript.Shell");
var oExec = WshShell.Exec("calc");
while (oExec.Status == 0)
{
WScript.Sleep(100);
}
WScript.Echo(oExec.Status); |
Properties
Methods
See Also